package MyApp::Controller::Hoge::Fuga;

use strict;
use warnings;
use base 'Catalyst::Controller';

=head1 NAME

MyApp::Controller::Hoge::Fuga - Catalyst Controller

=head1 DESCRIPTION

Catalyst Controller.

=head1 METHODS

=cut


=head2 index 

=cut

#sub index : Private {
#    my ( $self, $c ) = @_;
#
#    $c->response->body('Matched MyApp::Controller::Hoge::Fuga in Hoge::Fuga.');
#}


#sub root : Chained('/bar/start') PathPart('fyga') CaptureArgs(0) {
#    my ( $self, $c ) = @_;
#}
#
#sub instance : Chained('root') PathPart('') CaptureArgs(1) {
#    my ( $self, $c ) = @_;
#
#    $c->stash->{bookmark} = $c->req->captures->[1];
#}
#
#sub list : Chained('root') PathPart('') Args(0) {
#    my ( $self, $c ) = @_;
#
#    $c->res->body( ref($self) . '->list' );
#}
#
#sub add : Chained('root') PathPart Args(0) {
#    my ( $self, $c ) = @_;
#
#    $c->res->body( ref($self) . '->add' );
#}

sub fuga : Chained('/bar/start') PathPrefix('fuga') CaptureArgs(0) {
#sub fuga : Chained('/hoge/root') PathPrefix('fuga') CaptureArgs(0) {
    my ( $self, $c ) = @_;
}

sub instance : Chained('fuga') PathPart('') CaptureArgs(1) {
    my ( $self, $c ) = @_;
    $c->stash->{user} = $c->req->captures->[0];
}

sub list : Chained('fuga') PathPart('') Args(0) {
    my ( $self, $c ) = @_;

    my $user = $c->stash->{user};
    $c->response->body('List Matched MyApp::Controller::Hoge in Hoge.'.$user);
}

sub info : Chained('instance') PathPart('') Args(0) {
    my ( $self, $c ) = @_;

    my $user = $c->stash->{user};
    $c->response->body('Info Matched MyApp::Controller::Hoge in Hoge.'.$user);
}



=head1 AUTHOR

竹田 昭仁

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

1;
